package com.jxk.provider1.controller;

import com.jxk.common.entity.User;
import com.jxk.provider1.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (User)表控制层
 *
 * @author makejxk
 * @since 2021-01-28 16:05:17
 */
@RestController
@Slf4j
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/user/selectOne")
    public User selectOne(Integer id) {
        log.info("我是服务者");
        return this.userService.queryById(id);
    }
  /*test*/
}